Page({
    data: {
        tags : []
    },
    onLoad: function (options) {
        this.xInit()
    },
    xInit : function () {
        let that = this
        wx.cloud.callFunction({
            name: 'dynamic_content',
            data: {
                action: "get_labels"
               }
        }).then(res => {
            that.setData({
                tags : res.result
            })
            console.log("返回:", res.result)
        })
    },

    xToCreate : function (e) {
        let params = e.currentTarget.dataset
        wx.navigateTo({
            url: '/common/pages/posts/index/index?label=' + params.label + '&id=' + params.id,
        })
    }
})